#!/bin/bash
rm rootfs.i686.cpio.* 2>/dev/null

cd rootfs
cp ../etc_back/* etc/ -r
cp ../minibackup.sh bin/
chmod 555 bin/minibackup.sh
#find . | cpio --quiet -o -H newc | gzip > ../rootfs.i686.cpio.gz
find . | cpio --quiet -o -H newc | lzma > ../rootfs.i686.cpio.lzma
cd ..
umount /dev/sda5 2> /dev/null
mount /dev/sda5 mnt/sda5
cp rootfs.i686.cpio.lzma mnt/sda5/boot/mini/ -f
umount /dev/sda5
